﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>金易贷后台管理系统</title>
     <link href="@Url.Content("~/skin/css/main.css")" rel="stylesheet" type="text/css" />
     <script src="@Url.Content("~/skin/js/jquery-1.7.1.min.js")" type="text/javascript"></script>
</head>
<body>
    <div>
        @using (Html.BeginForm())
        {
        <fieldset>
        <legend>金易贷后台管理系统</legend>
        <ul>
            <li class="li01">
                <span class="s01"><font color="red"></font>登录名：</span>
                <span class="s02"><input name="name" type="text"  maxlength="50" value="admin3"/></span>
                <i class="i01">请输入登录名！</i>
            </li>
           <li class="li01">
                <span class="s01"><font color="red"></font>密码：</span>
                <span class="s02"><input name="pwd"  type="password"  maxlength="100"  value="123456"/></span>
                <i class="i01">请输入密码！</i>
            </li>
            <li>
                <span class="s01"></span>
                <span class="s02"><input  type="submit" value="提交" onclick="return check();"/></span>
                <i class="i01"></i>
            </li>
        </ul>
    </fieldset>
        }
    </div>
    <script src="@Url.Content("~/skin/js/md5.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            if (window.dialogArguments) {
                window.dialogArguments.location = window.location;
                window.close();
            }

            $(".i01").hide();
        });
        
        function check() {
            var chk = true;
            $(".i01").hide();
            $("input[type!='submit']").each(function () {
                if (!$(this).val()) {
                    $(this).parent().next().show();
                    chk = false;
                }
            });
            if (!chk) return;
            $("input[name='pwd']").val(md5($("input[name='pwd']").val()));
//            $("input[type!='submit']").each(function () {
//                $(this).val(md5($(this).val()));
//            });
            return true;
        }
    </script>
    @if (!string.IsNullOrWhiteSpace(this.ViewBag.Msg))
    {
    <script type="text/javascript">
        $(document).ready(function () {
            $(".i01").last().text("@this.ViewBag.Msg");
            $(".i01").last().show();
            $("input[name='pwd']").val('');
        });
    </script>
    }
</body>
</html>

